<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 * 微信号db管理
 */

require_once(dirname(__FILE__) . "/../common/EasyMysql.php");
require_once(dirname(__FILE__) . "/../config/ConfigDB.php");

class WeiXinCom{
    
    function __construct()
    {
        $dbconfig = $GLOBALS["config"] ['database'];
        $mysql = new EasyMysql ($dbconfig['hostname'], $dbconfig ['port'], $dbconfig ['username'], $dbconfig ['password'], $dbconfig ['db'], $dbconfig ['charset']);
        $this->mysql = $mysql;
    }
    
    function getinfo($id){
//        try{
//            $sql = "select * from weixinapp where id = '{$id}'";
//            $ret = $this->mysql->query($sql);
//            if (!empty ($ret) && !empty ($ret [0]) && !empty ($ret [0][0])) {
//                return $ret [0][0];
//            }
//        } catch (Exception $ex) {
//            throw new Exception ("AppDao.fetchList: " . $ex->getMessage());
//        }
        $array = array("appid"=>"wx6cb19f01728284e9","appsecret"=>"03932f973d78d46b88986cc10cba05db");
        return $array;
    }
    
}